<template>
  <div>
      <h1>通过path:'/profile',query:{name:'张三',age:20}传递参数</h1>
      <h2>我是profile页面</h2>
      <h2>姓名：{{user.name}}，年龄：{{user.age}}，id为{{user.userid}}</h2>
  </div>
</template>

<script>
export default {
    name:"Profile",
    computed: {
        user(){
            return this.$route.query
        }
    },
    created() {
        console.log('profile-created');
        
    },
    destroyed() {
        console.log('profile-destroyed');
    },
}
</script>

<style>

</style>